<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Ad_model extends MY_Model
{
    public function __construct() {
        parent::__construct();
    }
	/**
	 * 获取列表
	 *
	 * return array
	 */
	public function getAdList($type = 0)
	{
		$where = " AND type = 0";
        if($type === 1)
        {
            $where = " and type=1";
        }
    	$sql = "SELECT * FROM blues_advertisement  WHERE isDel=0 {$where} AND onlinestatus = 1 ORDER BY addtime";
        $query = $this->db->query($sql);

		return $query->result_array();
	}


}

